package com.atguigu_01;

import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapters;
import java.util.Objects;

public class Order {
    int orderId;
    String orderName;
    public int getOrderId() {
        return orderId;
    }
    public String getOrderName() {
        return orderName;
    }
    public void setOrderId(int orderId) {
        this.orderId = orderId;
    }
    public void setOrderName(String orderName) {
        this.orderName = orderName;
    }

    public Order(int orderId) {
        this.orderId = orderId;
    }
    public Order(int orderId,String orderName){
        this.orderId=orderId;
        this.orderName=orderName;
    }
    public Order(String orderName){
        this.orderName=orderName;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Order order = (Order) o;
        return orderId == order.orderId && orderName.equals(order.orderName);
    }
}
